<!--
 * @Author: HeAo
 * @Date: 2022-08-25 19:29:33
 * @LastEditTime: 2022-08-25 19:31:32
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \JavaScripe\day-14BOM\03-系统对话框.html
 * 别乱动！
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 1、警告框
    alert('这是一个警告框')
    console.log('等待window加载完毕');

    // 确认框 confirm
    var res = confirm('是否确认当前操作')
    // console.log(res);
    if (res) {
      console.log('点击了确认按钮');
    } else {
      console.log('点击了取消按钮');
    }

    // 输入确认框prompt
    var res = prompt('请输入你的名字')
    // console.log(res);
    if (res) {
      console.log(res);
    } else {
      console.log('点击了取消按钮');
    }
  </script>
</body>

</html>